package com.woniuxy.commons.entity.purchaseManager.base;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName PurchaseBaseEntity
 * @Description 采购公共类
 * @Author xianhao
 * @Date 2022/4/18 20:24
 * @Version 1.0.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class PurchaseBaseEntity implements Serializable  {

    private static final long serialVersionUID = 1L;

    /**
     * 逻辑删除
     */
    @ExcelIgnore
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;
    /**
     * 乐观锁
     */
    @ExcelIgnore
    @TableField("revision")
    private Integer revision;
    /**
     * 创建人
     */
    @ExcelIgnore
    @TableField("created_by")
    private String createdBy;
    /**
     * 创建时间
     */
    @ExcelProperty("制单时间")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_time")
    private Date createdTime;
    /**
     * 更新人
     */
    @ExcelIgnore
    @TableField("update_by")
    private String updateBy;
    /**
     * 更新时间
     */
    @ExcelIgnore
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private Date updateTime;
}
